cmake_minimum_required(VERSION 3.16)

project(LoginWidget LANGUAGES CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)



add_library(LoginWidget SHARED
  LoginWidget_global.h
  LoginWidget.cpp
  LoginWidget.h
  LeftLoginWidget.h LeftLoginWidget.cpp
  RightWidght.h RightWidght.cpp
  EditBox.h EditBox.cpp
)

target_link_libraries(LoginWidget PUBLIC

  Qt${QT_VERSION_MAJOR}::Widgets
  BaseWidgets
)

target_include_directories( LoginWidget PRIVATE
  ${CMAKE_SOURCE_DIR}/GUIWidget/BaseWidgets

)

target_compile_definitions(LoginWidget PRIVATE LOGINWIDGET_LIBRARY)
